{extend name="wap@style/base" /}
{block name="resources"}
<link rel="stylesheet" href="WAP_CSS/login_css/login.css" />
{/block}
{block name="main"}
{php}
$oauth_login_config = api("System.Login.getOAuthLoginType");
$register_config = api("System.Login.registerConfig", ['site_id'=>SITE_ID]);
{/php}

<div class="hui-wrap">
	<div class="hui-center-title" style="margin-top:35px;"><h1 style="border:0px;">会员登录</h1></div>
	<div style="margin:20px 10px; margin-bottom:15px;" class="hui-form" id="member_form">
		<div class="hui-form-items">
			<div class="hui-form-items-title">账号</div>
			<input type="text" class="hui-input hui-input-clear" name="username" id="username" placeholder="请输入账号" checkType="string" checkData="1," checkMsg="请输入账号!" />
		</div>
		<div class="hui-form-items">
			<div class="hui-form-items-title">登录密码</div>
			<input type="password" class="hui-input hui-pwd-eye"name="password" id="password" placeholder="请输入密码" checkType="string" id="pwd" checkData="1," checkMsg="请输入密码!" />
		</div>
		{if condition="$register_config['data'] && $register_config['data']['web_code'] == '1' "}
		<div class="hui-form-items">
			<div class="hui-form-items-title">验证码</div>
			<input type="number" class="hui-input" name="captcha" value="" checkType="reg" checkData="^\d{4,4}$" checkMsg="验证码应该为4个数字" />
			<div style="width:160px;">
				<img src="{:url('wap/login/captcha')}" onclick="this.src='{:url("wap/login/captcha")}'" alt="captcha" >
			</div>
		</div>
		{/if}
	</div>
	<div style="padding:10px; padding-top:10px;">
		<button type="button" class="hui-button hui-button-large hui-primary" id="submit">立即登录</button>
	</div>

	<div class="login-bottom">
		<a  href="{:url('wap/login/register')}"class="login-left">没有账号？去注册</a>
		<a onclick="hui.shwoBlackMasker();" class="forget-pwd login-right">忘记密码？</a>
		<div class="clear"></div>
	</div>
</div>
{if !empty($oauth_login_config['data'])}
<div class="hui-common-title" style="margin-top:15px;">
	<div class="hui-common-title-line"></div>
	<div class="hui-common-title-txt">社交账号登录</div>
	<div class="hui-common-title-line"></div>
</div>
<div class="hui-flex" style="width:200px;margin:0 auto;">
	{volist name="$oauth_login_config['data']" id="vo"}
	<div class="oauth-item">
		<a href="{:addon_url('OAuthLogin://common/login/login', ['addon_name' => $vo['name']])}">
			<img src="{$vo.icon}">
		</a>
	</div>
	{/volist}
</div>

{/if}
<div id="hui-black-mask" style="display:none;">
	<!-- 演示消息内容 -->
	<div id="hui-black-mask-content">
		<div id="hui-black-action">
			<div id="hui-black-close"></div>
		</div>
		<div style="text-align:center;padding:20px; background-color:#FFF;color:#FFFFFF; ">
			<div class="hui-flex">
				<div class="mask-model-item"><a href="{:url('wap/login/findPwd','type=1')}"><img src="WAP_IMG/login_img/phone.png"/><p>手机找回</p></a></div>
				<div class="mask-model-item"><a href="{:url('wap/login/findPwd','type=2')}"><img src="WAP_IMG/login_img/email.png"/><p>邮箱找回</p></a></div>
			</div>
		</div>
	</div>
</div>

{/block}
{block name="script"}
<script type="text/javascript" src="__STATIC__/ext/hui/js/hui-form.js"></script>
<script>
	var cookie_name = "access_token_{$site_info['site_id']}";
</script>
<script src="WAP_JS/login_js/login.js"></script>
{/block}